<?php $this->load->view('admin/adhead.html'); ?>
<?php $this->load->view('admin/adsider.html'); ?>
<style type="text/css">
<!--
.shr { margin-top:0}
-->
</style>
  <!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">

    <!-- Main content -->
    <section class="content">

      <div class="row">
        <div class="col-md-3">

          <!-- Profile Image -->
          <div class="box box-primary">
            <div class="box-body box-profile">
              <img class="profile-user-img img-responsive img-circle" src="<?=$userpic?>" alt="User profile picture">

              <h3 class="profile-username text-center"><?=$user->name?></h3>

              <p class="text-muted text-center"><?=$user->email?></p>

			  <ul class="list-group list-group-unbordered">
                <li class="list-group-item"><a href="#">发表文章数 <span class="pull-right badge bg-blue"><?=$num?></span></a></li>
                <li class="list-group-item"><a href="#">评论数 <span class="pull-right badge bg-green">5</span></a></li>
                <li class="list-group-item"><a href="#">获赞数 <span class="pull-right badge bg-red">12</span></a></li>
              </ul>
              <a href="<?php echo site_url('admin/editprofile'); ?>" class="btn btn-primary btn-block"><b>编&nbsp;&nbsp;辑</b></a>
            </div>
            <!-- /.box-body -->
          </div>
          <!-- /.box -->

          <!-- About Me Box -->
          <div class="box box-primary">
            <div class="box-header with-border">
              <h3 class="box-title">About Me</h3>
            </div>
            <!-- /.box-header -->
            <div class="box-body">
              <strong><i class="fa fa-book margin-r-5"></i> College</strong>

              <p class="text-muted"><?=$user->college?></p>

              <hr class="shr">

              <strong><i class="fa fa-map-marker margin-r-5"></i> Location</strong>

              <p class="text-muted"><?=$user->location?></p>

              <hr class="shr">

              <strong><i class="fa fa-pencil margin-r-5"></i> Skills</strong>

              <p>
                <span class="label label-danger">UI Design</span>
                <span class="label label-success">Coding</span>
                <span class="label label-info">Javascript</span>
                <span class="label label-warning">PHP</span>
                <span class="label label-primary">Node.js</span>
              </p>

              <hr class="shr">

              <strong><i class="fa fa-file-text-o margin-r-5"></i> Notes</strong>

              <p><?=$user->notes?></p>
            </div>
            <!-- /.box-body -->
          </div>
          <!-- /.box -->
        </div>
        <!-- /.col -->
        <div class="col-md-9">
			<div class="row">
        <div class="col-xs-12">
          <div class="box box-primary">
            <div class="box-header">
              <h3 class="box-title">文章列表</h3>

              <div class="box-tools">
                <div class="input-group input-group-sm" style="width: 150px;">
                  <input type="text" name="table_search" class="form-control pull-right" placeholder="Search">

                  <div class="input-group-btn">
                    <button type="submit" class="btn btn-default"><i class="fa fa-search"></i></button>
                  </div>
                </div>
              </div>
            </div>
            <!-- /.box-header -->
            <div class="box-body table-responsive no-padding">
              <table class="table table-hover">
                <tbody><tr>
					<th style="text-align:center;">序号</th>
                  <th>标题</th>
                  <th>分类</th>
                  <th>时间</th>
                  <th>编辑</th>
				  
                </tr>
<?php $j=1; ?>
                <?php foreach($arts as $item):  ?>
	<tr>
		<td align="center"><?php echo $j;$j++;?></td>
		<td><?=$item->title?></td>
		<td><?php foreach($cate as $i):?><?php if($i->id==$item->cate){echo $i->name;} ?><?php endforeach; ?></td>
		<td><?=$item->time?></td>
		<td><?=$item->uid?></td>
		
	</tr>
	<?php endforeach; ?>
     
              </tbody></table>
            </div>
            <!-- /.box-body -->

			<div class="box-footer clearfix">
				<ul class="pagination pagination-sm no-margin pull-left">
					共有  <?php echo isset($num)?$num:"";  ?> 条记录
				</ul>
              <ul class="pagination pagination-sm no-margin pull-right">

			<?php echo isset($pages)?$pages:""; ?>
              </ul>
            </div>

          </div>
          <!-- /.box -->
        </div>
      </div>
          <!-- /.col-md-9 -->
        </div>
        <!-- /.col -->
      </div>
      <!-- ./row -->

    </section>
    <!-- /.content -->
  </div>
  <!-- /.content-wrapper -->

<?php $this->load->view('admin/adfooterueditor.html'); ?>